<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    
	
	<title>_调拨申请详情</title>
</head>

<body>
    <div style="height: 10px;"></div>
    
    <!-- 日志 -->	
	<table id="contentTable" class="table  table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="4" bgcolor="#8EB4CB">调拨进度</th>
		</thead>
		<thead><tr>
		    <th style="width: 100px;">处理人</th>
		    <th style="width: 150px;">处理时间</th>
			<th style="width: 100px;">处理环节</th>
			<th >描述</th>
		</tr></thead>
		<c:forEach  items="${logList}" var="log">
			 <tr>
		       <td>${log.user.realname}</td>
		       <td>${fn:substring(log.startTime,0,19)}</td>
		       <td>
		          <c:if test="${log.workType eq '1' }">发起申请</c:if>
			      <c:if test="${log.workType eq '2' }">审核通过</c:if>
			      <c:if test="${log.workType eq '3' }">审核驳回</c:if>
			      <c:if test="${log.workType eq '4' }">创建拣货任务</c:if>
			      <c:if test="${log.workType eq '5' }">指派拣货任务</c:if>
			      <c:if test="${log.workType eq '6' }">拣货任务完成</c:if>
			      <c:if test="${log.workType eq '7' }">打包</c:if>
			      <c:if test="${log.workType eq '8' }">出库</c:if>
			      <c:if test="${log.workType eq '9' }">入库</c:if>
			      <c:if test="${log.workType eq '10' }">调拨完成</c:if>
		       </td>
		       <td>${log.info}</td>
			 </tr>
		</c:forEach>
	</table>
	

	<!-- 调拨申请单信息 -->
	<table id="contentTable" class="table  table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="4" bgcolor="#8EB4CB">调拨申请数据</th>
		</thead>
		<thead>
		<tr >
			<td colspan="4">
				<div class="row" style="margin-top: 15px;">
					<div class="span12" style="margin-left: 20px;">
						<form class="form-search">
						    <label style="margin-left:10px;">调拨单号：</label> 
							<input  type="text" value="${allot.allotCode}" readonly="readonly" class="input-large"/>
							<label style="margin-left:10px;">调出仓库：</label> 
							<input  type="text" value="${allot.outstorage.groupName}" readonly="readonly" class="input-large"/>
							<label style="margin-left:10px;">调入仓库：</label> 
							<input  type="text" value="${allot.instotrage.groupName}" readonly="readonly" class="input-large"/>
					    </form>
				    </div>
				</div>
			</td>
		</tr>
		<tr>
		    <th style="width: 80px;">商家</th>
		    <th style="width: 80px;">sku编码</th>
			<th style="width: 80px;">调拨申请数量</th>
		</tr></thead>
		<c:forEach  items="${itemList}" var="item">
			 <tr>
		       <td>${item.customerCode}</td>
		       <td>${item.sku}</td>
		       <td>${item.allotNum}</td>
			 </tr>
		</c:forEach>
	</table>
	
	
	<!-- 出库单信息 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">出库单信息</th>
		</thead>
		<thead>
		
		<tr >
			<td colspan="4">
				<div class="row" style="margin-top: 15px;">
					<div class="span12" style="margin-left: 20px;">
						<form class="form-search">
						    <label style="margin-left:10px;">出库单号：</label> 
							<input  type="text" value="${bill.billCode}" readonly="readonly" class="input-large"/>
							<label style="margin-left:10px;">调拨单号：</label> 
							<input  type="text" value="${bill.aboutCode}" readonly="readonly" class="input-large"/>
							<label style="margin-left:10px;">出库网点：</label> 
							<input  type="text" value="${bill.areagroup.groupName}" readonly="readonly" class="input-large"/>
							<label style="margin-left:10px;">当前环节：</label> 
							<input  type="text" 
							  <c:if test="${bill.status eq '1'}">value='生成出库单'</c:if>
						      <c:if test="${bill.status eq '2'}">value='已打包'</c:if>
						      <c:if test="${bill.status eq '3'}">value='已出库'</c:if>
							 readonly="readonly" class="input-large"/>
					    </form>
				    </div>
				</div>
			</td>
		</tr>
		
		<thead><tr>
		    <th style="width: 100px;">商家</th>
		    <th style="width: 100px;">sku</th>
		    <th style="width: 100px;">数量</th>
		</tr></thead>
		<tbody>
		<c:forEach items="${billItemList}" var="item">
		<tr>
		    <td>${item.customerCode}</td>
		    <td>${item.sku}</td>
		    <td>${item.num}</td>
		</tr>
		</c:forEach>
		</tbody>
		
	</table>
	
	
	<!-- 打包信息 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">打包、发货信息</th>
		</thead>
		<thead><tr>
		    <th style="width: 150px;">箱子数量</th>
		    <th style="width: 100px;">SKU数量</th>
		    <th style="width: 150px;">商品总数</th>
		</tr></thead>
		<tbody>
		<tr>
		    <td>
		       <input  type="hidden" name="billId" value="${bill.id}"/>
		       ${bill.boxNum}
		    </td>
		    <td>${bill.skuNum}</td>
		    <td>${bill.goodsNum}</td>
		</tr>
		<tr>
		    <td colspan="3">
		       <b>发货信息：</b>
		       <textarea name="remark" style="width: 445px;height: 100px;" class="required">${bill.remark}</textarea>
		    </td>
		</tr>
		</tbody>
	</table>
		
		
	<div class="form-actions">
		<input id="cancel_btn" class="btn" type="button" value="返回" onclick="history.back()"/>
   </div>
	   
</body>
</html>
